﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>app下载</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
        /* CSS Document */
        *{ margin:0; padding:0;}
        body{ font-size:14px; font-family:Arial, Helvetica, sans-serif,"微软雅黑"; color:#333;}
        body,ul,li,p,input,img,h1,h2,h3,h4,h5,h6,p{ margin:0; padding:0;}
        input,img{ border:none;}
        ul,li,ol{ list-style:none;}
        a{font-family:Arial, Helvetica, sans-serif,"微软雅黑","宋体","黑体"; color:#333; text-decoration:none;}
        a:hover{ color:#000; text-decoration:none;}
        i{ font-style:normal; font-weight:normal;}
        .clear{ clear:both; overflow:hidden;}
        .mid{ width:1000px; height:auto; margin:0 auto;}

        /*  app  */
        .wrapper{background:url("__STATIC__/images/app_bg.png") no-repeat center; background-size:100% auto;
            width:100%; height:100%; position:fixed; overflow: hidden; }
        .wraps{ height:100%; position:relative}
        .logo{position: absolute;left: 0;right: 0;top:15%; text-align:center; }
        .logo-img{ width:70%;}
        .plea{ position: absolute;left: 0;right: 0;top:35%;background:rgba(255,255,255,.3); padding:5%; width:65%;
            margin:0 auto; border-radius:10px;}
        .plea span{ display:block; width:70%; height:35px; border-radius:5px; line-height:35px;
            background:rgba(255,255,255,.7); color:#666; float:left; text-indent:1em;}
        .plea a{ display:block; width:25%; height:35px; border-radius:5px; line-height:35px; text-align:center;
            background:#a8e67e; color:#000; float:right;}
        .plea p{ color:#333; clear:both; padding-top:10px;}
        .main-content{position: absolute;left: 0;right: 0;top:62%;}
        .and, .ios{ display:block; width:55%; height:50px; line-height:50PX; border-radius:10px;
            color:#fff; margin:0 auto 30px; border:2px solid #fff; text-align:center}
        .and img, .ios img{ vertical-align:middle;}
        .banben{position: absolute;left: 0;right: 0;top:90%; color:#fff; text-align:center;}
        .weixin-tip {
            display: none;
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            filter: alpha(opacity=80);
            height: 100%;
            width: 100%;
            z-index: 100;
        }

        .weixin-tip p {
            text-align: center;
            margin-top: 10%;
            padding: 0 5%;
        }
    </style>
</head>
<body>

    <div class="wrapper">   
        <div class="wraps"> 
          <div class="logo"><img src="__STATIC__/images/logo.png" class="logo-img" ></div>
          <div class="plea">
              <span>邀请码：<p id="con" style="display: inline" data-clipboard-text="1">{$vip_code}</p></span><a id="copy" onclick="copy('{$vip_code}')">复制</a>
            <p>特别提醒：点击上方复制邀请码，下载APP。注册填写邀请码，系统提供专属您的销售经理为您提供全程优质服务！</p>
          </div>
          <div class="main-content">
              <a href="###" name="anzhuo" id="downloadButton"  data-url="https://shop.qiangnongzi.com/nongzi.apk" onclick="_hmt.push(['_trackEvent', 'software', 'download', 'manzhuo']);" class="and downloadButton">
                <img class="android" src="__STATIC__/images/and.png">
                  <img class="ios1" src="__STATIC__/images/ios.png">
                <span class="android">android下载</span>
                  <span class="ios1">iphone版下载</span>
              </a>
          </div>
          <div class="banben">版本号 {$version}</div>
        </div>   
    </div>
    <div class="weixin-tip" onclick="$(this).hide()" style="width: 100%;">
        <p>
            <img src="__STATIC__/images/w_tip.png" alt="微信打开" style="width: 100%;"/>
        </p>
    </div>

</body>

<script src="__STATIC__/lib/jquery/1.9.1/jquery.js"></script>
<script language="javascript">
    window.onload = function() {
        var u = navigator.userAgent;
        if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) { //安卓手机
            //                    alert("安卓手机");
            $(".ios1").hide();
        } else if (u.indexOf('iPhone') > -1) { //苹果手机
            //                    alert("苹果手机");
            $(".android").hide();
        } else if (u.indexOf('Windows Phone') > -1) { //winphone手机
            alert("WindowsPhone暂未推出。");
        } else if (u.indexOf('Windows NT') > -1) { //Windows电脑
            alert("请用手机浏览器访问。");
        }
    }
</script>
<script type="text/javascript" charset="UTF-8" src="https://res.cdn.openinstall.io/openinstall.js"></script>
<script type="text/javascript">
    //openinstall初始化时将与openinstall服务器交互，应尽可能早的调用
    /*web页面向app传递的json数据(json string/js Object)，应用被拉起或是首次安装时，通过相应的android/ios api可以获取此数据*/
    var data = OpenInstall.parseUrlParams();//openinstall.js中提供的工具函数，解析url中的所有查询参数
    new OpenInstall({
        /*appKey必选参数，openinstall平台为每个应用分配的ID*/
        appKey : "le0q7a",
        /*可选参数，自定义android平台的apk下载文件名，只有apk在openinstall托管时才有效；个别andriod浏览器下载时，中文文件名显示乱码，请慎用中文文件名！*/
        //apkFileName : 'com.fm.openinstalldemo-v2.2.0.apk',
        /*可选参数，是否优先考虑拉起app，以牺牲下载体验为代价*/
        //preferWakeup:true,
        /*自定义遮罩的html*/
        //mask:function(){
        //  return "<div id='openinstall_shadow' style='position:fixed;left:0;top:0;background:rgba(0,255,0,0.5);filter:alpha(opacity=50);width:100%;height:100%;z-index:10000;'></div>"
        //},
        /*openinstall初始化完成的回调函数，可选*/
        onready : function() {
            var m = this, button = document.getElementById("downloadButton");
            button.style.visibility = "visible";

            /*在app已安装的情况尝试拉起app*/
            m.schemeWakeup();
            /*用户点击某个按钮时(假定按钮id为downloadButton)，安装app*/
            button.onclick = function() {
                m.wakeupOrInstall();
                return false;
            }
        }
    }, data);

</script>

<!--<script src="__STATIC__/lib/clipboard/clipboard.js"></script>-->
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?556bd09e2491dbf6bca1187fe697f21c";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>

</html>